<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      p + span {
        color: aqua;
      }
      .all ~ span {
        color: bisque;
      }
    </style>
  </head>
  <body>
    <!-- 
      兄弟选择器：
        选择下一个兄弟
          语法：前一个 + 下一个
        
        选择下面的全部兄弟
          语法：兄~弟
     -->
    <div class="box">
      <span>p外的span</span>
      <span>p外的span</span>
      <p>
        <span>p中的span</span>
      </p>
      <span>p外的span</span>
      <span>p外的span</span>
      <hr />
      <p class="all">
        <span>p中的span</span>
      </p>
      <span>p外的span</span><br />
      <span>p外的span</span><br />
      <span>p外的span</span>
    </div>
  </body>
</html>
